<?php
declare(strict_types=1);

namespace WebApp\lib\app;

/**
 * Class NormalApp
 * @package WebApp\lib\app
 */
class NormalApp extends AbstractApp
{
    /**
     * NormalApp constructor.
     * @param string $module
     * @param array $params
     */
    public function __construct(string $module)
    {
        session_start();

        $this->module = $module;
        $this->_SESSION = &$_SESSION;
        $response = new class{};
        $request = new class{
            public function __construct()
            {
                $this->get = &$_GET;
                $this->post = &$_POST;
                $this->cookie = &$_COOKIE;
                $this->header = &$_SERVER;
            }
            public $get;
            public $post;
            public $cookie;
            public $header;
        };
        parent::__construct($request, $response);
    }

    public function sessionEnd(): void
    {
        tracker(D, "sessionEnd");
    }
}